import axios from 'axios'
import Axios from 'axios';
axios.defaults.baseURL = 'http://127.0.0.1:3000'
axios.defaults.withCredentials = true
export const queryTopProduct = () => axios.get('/category/queryTopCategory')
export const querySecondCategory = (id) => axios.get('/category/querySecondCategory', { params: { id: id } })
export const searchPro = obj => axios.get('/product/queryProduct', { params: obj })
export const proDetail = id => axios.get('/product/queryProductDetail', { params: { id: id } })
export const cartData = obj => axios.post('/cart/addCart', obj)
export const login = obj => axios.post('/user/login', obj)